3.52 \(\int \sec ^3(c+d x) (a+i a \tan (c+d x))^4 \, dx\)

Optimal. Leaf size=163 \[ \frac {7 i a^4 \sec ^3(c+d x)}{8 d}+\frac {21 a^4 \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {21 i \sec ^3(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{40 d}+\frac {21 a^4 \tan (c+d x) \sec (c+d x)}{16 d}+\frac {3 i \sec ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{10 d}+\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^3}{6 d} \]

[Out]

21/16*a^4*arctanh(sin(d*x+c))/d+7/8*I*a^4*sec(d*x+c)^3/d+21/16*a^4*sec(d*x+c)*tan(d*x+c)/d+1/6*I*a*sec(d*x+c)^
3*(a+I*a*tan(d*x+c))^3/d+3/10*I*sec(d*x+c)^3*(a^2+I*a^2*tan(d*x+c))^2/d+21/40*I*sec(d*x+c)^3*(a^4+I*a^4*tan(d*
x+c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.16, antiderivative size = 163, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3498, 3486, 3768, 3770} \[ \frac {7 i a^4 \sec ^3(c+d x)}{8 d}+\frac {21 a^4 \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {3 i \sec ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{10 d}+\frac {21 i \sec ^3(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{40 d}+\frac {21 a^4 \tan (c+d x) \sec (c+d x)}{16 d}+\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^3}{6 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^3*(a + I*a*Tan[c + d*x])^4,x]

[Out]

(21*a^4*ArcTanh[Sin[c + d*x]])/(16*d) + (((7*I)/8)*a^4*Sec[c + d*x]^3)/d + (21*a^4*Sec[c + d*x]*Tan[c + d*x])/
(16*d) + ((I/6)*a*Sec[c + d*x]^3*(a + I*a*Tan[c + d*x])^3)/d + (((3*I)/10)*Sec[c + d*x]^3*(a^2 + I*a^2*Tan[c +
 d*x])^2)/d + (((21*I)/40)*Sec[c + d*x]^3*(a^4 + I*a^4*Tan[c + d*x]))/d

Rule 3486

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*(d*Sec[
e + f*x])^m)/(f*m), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3498

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] + Dist[(a*(m + 2*n - 2))/(m + n - 1), Int[(
d*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] &&
 GtQ[n, 0] && NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \sec ^3(c+d x) (a+i a \tan (c+d x))^4 \, dx &=\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^3}{6 d}+\frac {1}{2} (3 a) \int \sec ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx\\ &=\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^3}{6 d}+\frac {3 i \sec ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{10 d}+\frac {1}{10} \left (21 a^2\right ) \int \sec ^3(c+d x) (a+i a \tan (c+d x))^2 \, dx\\ &=\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^3}{6 d}+\frac {3 i \sec ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{10 d}+\frac {21 i \sec ^3(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{40 d}+\frac {1}{8} \left (21 a^3\right ) \int \sec ^3(c+d x) (a+i a \tan (c+d x)) \, dx\\ &=\frac {7 i a^4 \sec ^3(c+d x)}{8 d}+\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^3}{6 d}+\frac {3 i \sec ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{10 d}+\frac {21 i \sec ^3(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{40 d}+\frac {1}{8} \left (21 a^4\right ) \int \sec ^3(c+d x) \, dx\\ &=\frac {7 i a^4 \sec ^3(c+d x)}{8 d}+\frac {21 a^4 \sec (c+d x) \tan (c+d x)}{16 d}+\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^3}{6 d}+\frac {3 i \sec ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{10 d}+\frac {21 i \sec ^3(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{40 d}+\frac {1}{16} \left (21 a^4\right ) \int \sec (c+d x) \, dx\\ &=\frac {21 a^4 \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {7 i a^4 \sec ^3(c+d x)}{8 d}+\frac {21 a^4 \sec (c+d x) \tan (c+d x)}{16 d}+\frac {i a \sec ^3(c+d x) (a+i a \tan (c+d x))^3}{6 d}+\frac {3 i \sec ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{10 d}+\frac {21 i \sec ^3(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{40 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 2.09, size = 171, normalized size = 1.05 \[ -\frac {a^4 (\cos (4 c)-i \sin (4 c)) (\tan (c+d x)-i)^4 \sec ^2(c+d x) \left (-4608 i \cos (c+d x)+5 (90 \sin (c+d x)+155 \sin (3 (c+d x))-63 \sin (5 (c+d x))-512 i \cos (3 (c+d x)))+5040 \cos ^6(c+d x) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )}{3840 d (\cos (d x)+i \sin (d x))^4} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^3*(a + I*a*Tan[c + d*x])^4,x]

[Out]

-1/3840*(a^4*Sec[c + d*x]^2*(Cos[4*c] - I*Sin[4*c])*((-4608*I)*Cos[c + d*x] + 5040*Cos[c + d*x]^6*(Log[Cos[(c
+ d*x)/2] - Sin[(c + d*x)/2]] - Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]) + 5*((-512*I)*Cos[3*(c + d*x)] + 90*
Sin[c + d*x] + 155*Sin[3*(c + d*x)] - 63*Sin[5*(c + d*x)]))*(-I + Tan[c + d*x])^4)/(d*(Cos[d*x] + I*Sin[d*x])^
4)

________________________________________________________________________________________

fricas [B]  time = 0.67, size = 364, normalized size = 2.23 \[ \frac {-630 i \, a^{4} e^{\left (11 i \, d x + 11 i \, c\right )} + 6670 i \, a^{4} e^{\left (9 i \, d x + 9 i \, c\right )} + 10116 i \, a^{4} e^{\left (7 i \, d x + 7 i \, c\right )} + 8316 i \, a^{4} e^{\left (5 i \, d x + 5 i \, c\right )} + 3570 i \, a^{4} e^{\left (3 i \, d x + 3 i \, c\right )} + 630 i \, a^{4} e^{\left (i \, d x + i \, c\right )} + 315 \, {\left (a^{4} e^{\left (12 i \, d x + 12 i \, c\right )} + 6 \, a^{4} e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, a^{4} e^{\left (8 i \, d x + 8 i \, c\right )} + 20 \, a^{4} e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} + 6 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{4}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 315 \, {\left (a^{4} e^{\left (12 i \, d x + 12 i \, c\right )} + 6 \, a^{4} e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, a^{4} e^{\left (8 i \, d x + 8 i \, c\right )} + 20 \, a^{4} e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} + 6 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{4}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right )}{240 \, {\left (d e^{\left (12 i \, d x + 12 i \, c\right )} + 6 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 20 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 6 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")

[Out]

1/240*(-630*I*a^4*e^(11*I*d*x + 11*I*c) + 6670*I*a^4*e^(9*I*d*x + 9*I*c) + 10116*I*a^4*e^(7*I*d*x + 7*I*c) + 8
316*I*a^4*e^(5*I*d*x + 5*I*c) + 3570*I*a^4*e^(3*I*d*x + 3*I*c) + 630*I*a^4*e^(I*d*x + I*c) + 315*(a^4*e^(12*I*
d*x + 12*I*c) + 6*a^4*e^(10*I*d*x + 10*I*c) + 15*a^4*e^(8*I*d*x + 8*I*c) + 20*a^4*e^(6*I*d*x + 6*I*c) + 15*a^4
*e^(4*I*d*x + 4*I*c) + 6*a^4*e^(2*I*d*x + 2*I*c) + a^4)*log(e^(I*d*x + I*c) + I) - 315*(a^4*e^(12*I*d*x + 12*I
*c) + 6*a^4*e^(10*I*d*x + 10*I*c) + 15*a^4*e^(8*I*d*x + 8*I*c) + 20*a^4*e^(6*I*d*x + 6*I*c) + 15*a^4*e^(4*I*d*
x + 4*I*c) + 6*a^4*e^(2*I*d*x + 2*I*c) + a^4)*log(e^(I*d*x + I*c) - I))/(d*e^(12*I*d*x + 12*I*c) + 6*d*e^(10*I
*d*x + 10*I*c) + 15*d*e^(8*I*d*x + 8*I*c) + 20*d*e^(6*I*d*x + 6*I*c) + 15*d*e^(4*I*d*x + 4*I*c) + 6*d*e^(2*I*d
*x + 2*I*c) + d)

________________________________________________________________________________________

giac [A]  time = 1.32, size = 237, normalized size = 1.45 \[ \frac {315 \, a^{4} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - 315 \, a^{4} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right ) - \frac {2 \, {\left (75 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 960 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{10} + 1175 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 4800 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 1890 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 4480 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 1890 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 1920 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 1175 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1728 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 75 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 448 i \, a^{4}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{6}}}{240 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a+I*a*tan(d*x+c))^4,x, algorithm="giac")

[Out]

1/240*(315*a^4*log(tan(1/2*d*x + 1/2*c) + 1) - 315*a^4*log(tan(1/2*d*x + 1/2*c) - 1) - 2*(75*a^4*tan(1/2*d*x +
 1/2*c)^11 + 960*I*a^4*tan(1/2*d*x + 1/2*c)^10 + 1175*a^4*tan(1/2*d*x + 1/2*c)^9 - 4800*I*a^4*tan(1/2*d*x + 1/
2*c)^8 - 1890*a^4*tan(1/2*d*x + 1/2*c)^7 + 4480*I*a^4*tan(1/2*d*x + 1/2*c)^6 - 1890*a^4*tan(1/2*d*x + 1/2*c)^5
 - 1920*I*a^4*tan(1/2*d*x + 1/2*c)^4 + 1175*a^4*tan(1/2*d*x + 1/2*c)^3 + 1728*I*a^4*tan(1/2*d*x + 1/2*c)^2 + 7
5*a^4*tan(1/2*d*x + 1/2*c) - 448*I*a^4)/(tan(1/2*d*x + 1/2*c)^2 - 1)^6)/d

________________________________________________________________________________________

maple [B]  time = 0.52, size = 324, normalized size = 1.99 \[ \frac {a^{4} \left (\sin ^{5}\left (d x +c \right )\right )}{6 d \cos \left (d x +c \right )^{6}}+\frac {a^{4} \left (\sin ^{5}\left (d x +c \right )\right )}{24 d \cos \left (d x +c \right )^{4}}-\frac {a^{4} \left (\sin ^{5}\left (d x +c \right )\right )}{48 d \cos \left (d x +c \right )^{2}}-\frac {a^{4} \left (\sin ^{3}\left (d x +c \right )\right )}{48 d}-\frac {13 a^{4} \sin \left (d x +c \right )}{16 d}+\frac {21 a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16 d}+\frac {4 i a^{4}}{3 d \cos \left (d x +c \right )^{3}}+\frac {8 i a^{4} \cos \left (d x +c \right )}{15 d}-\frac {4 i a^{4} \left (\sin ^{4}\left (d x +c \right )\right )}{15 d \cos \left (d x +c \right )^{3}}+\frac {4 i a^{4} \left (\sin ^{4}\left (d x +c \right )\right )}{15 d \cos \left (d x +c \right )}+\frac {4 i a^{4} \cos \left (d x +c \right ) \left (\sin ^{2}\left (d x +c \right )\right )}{15 d}-\frac {3 a^{4} \left (\sin ^{3}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{4}}-\frac {3 a^{4} \left (\sin ^{3}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{2}}-\frac {4 i a^{4} \left (\sin ^{4}\left (d x +c \right )\right )}{5 d \cos \left (d x +c \right )^{5}}+\frac {a^{4} \sec \left (d x +c \right ) \tan \left (d x +c \right )}{2 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^3*(a+I*a*tan(d*x+c))^4,x)

[Out]

1/6/d*a^4*sin(d*x+c)^5/cos(d*x+c)^6+1/24/d*a^4*sin(d*x+c)^5/cos(d*x+c)^4-1/48/d*a^4*sin(d*x+c)^5/cos(d*x+c)^2-
1/48*a^4*sin(d*x+c)^3/d-13/16*a^4*sin(d*x+c)/d+21/16/d*a^4*ln(sec(d*x+c)+tan(d*x+c))+4/3*I/d*a^4/cos(d*x+c)^3+
8/15*I/d*a^4*cos(d*x+c)-4/15*I/d*a^4*sin(d*x+c)^4/cos(d*x+c)^3+4/15*I/d*a^4*sin(d*x+c)^4/cos(d*x+c)+4/15*I/d*a
^4*cos(d*x+c)*sin(d*x+c)^2-3/2/d*a^4*sin(d*x+c)^3/cos(d*x+c)^4-3/4/d*a^4*sin(d*x+c)^3/cos(d*x+c)^2-4/5*I/d*a^4
*sin(d*x+c)^4/cos(d*x+c)^5+1/2*a^4*sec(d*x+c)*tan(d*x+c)/d

________________________________________________________________________________________

maxima [A]  time = 0.51, size = 246, normalized size = 1.51 \[ -\frac {5 \, a^{4} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{5} + 8 \, \sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 180 \, a^{4} {\left (\frac {2 \, {\left (\sin \left (d x + c\right )^{3} + \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 120 \, a^{4} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - \frac {640 i \, a^{4}}{\cos \left (d x + c\right )^{3}} - \frac {128 i \, {\left (5 \, \cos \left (d x + c\right )^{2} - 3\right )} a^{4}}{\cos \left (d x + c\right )^{5}}}{480 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a+I*a*tan(d*x+c))^4,x, algorithm="maxima")

[Out]

-1/480*(5*a^4*(2*(3*sin(d*x + c)^5 + 8*sin(d*x + c)^3 - 3*sin(d*x + c))/(sin(d*x + c)^6 - 3*sin(d*x + c)^4 + 3
*sin(d*x + c)^2 - 1) - 3*log(sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1)) + 180*a^4*(2*(sin(d*x + c)^3 + sin(d
*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) + 120*a^4*(2
*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) - 640*I*a^4/cos(d*x + c)^3
 - 128*I*(5*cos(d*x + c)^2 - 3)*a^4/cos(d*x + c)^5)/d

________________________________________________________________________________________

mupad [B]  time = 7.16, size = 290, normalized size = 1.78 \[ \frac {21\,a^4\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}-\frac {\frac {5\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{8}+a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,8{}\mathrm {i}+\frac {235\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{24}-a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,40{}\mathrm {i}-\frac {63\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,112{}\mathrm {i}}{3}-\frac {63\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}-a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,16{}\mathrm {i}+\frac {235\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24}+\frac {a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,72{}\mathrm {i}}{5}+\frac {5\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8}-\frac {a^4\,56{}\mathrm {i}}{15}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(c + d*x)*1i)^4/cos(c + d*x)^3,x)

[Out]

(21*a^4*atanh(tan(c/2 + (d*x)/2)))/(8*d) - ((a^4*tan(c/2 + (d*x)/2)^2*72i)/5 + (235*a^4*tan(c/2 + (d*x)/2)^3)/
24 - a^4*tan(c/2 + (d*x)/2)^4*16i - (63*a^4*tan(c/2 + (d*x)/2)^5)/4 + (a^4*tan(c/2 + (d*x)/2)^6*112i)/3 - (63*
a^4*tan(c/2 + (d*x)/2)^7)/4 - a^4*tan(c/2 + (d*x)/2)^8*40i + (235*a^4*tan(c/2 + (d*x)/2)^9)/24 + a^4*tan(c/2 +
 (d*x)/2)^10*8i + (5*a^4*tan(c/2 + (d*x)/2)^11)/8 - (a^4*56i)/15 + (5*a^4*tan(c/2 + (d*x)/2))/8)/(d*(15*tan(c/
2 + (d*x)/2)^4 - 6*tan(c/2 + (d*x)/2)^2 - 20*tan(c/2 + (d*x)/2)^6 + 15*tan(c/2 + (d*x)/2)^8 - 6*tan(c/2 + (d*x
)/2)^10 + tan(c/2 + (d*x)/2)^12 + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a^{4} \left (\int \left (- 6 \tan ^{2}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\right )\, dx + \int \tan ^{4}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int 4 i \tan {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int \left (- 4 i \tan ^{3}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\right )\, dx + \int \sec ^{3}{\left (c + d x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**3*(a+I*a*tan(d*x+c))**4,x)

[Out]

a**4*(Integral(-6*tan(c + d*x)**2*sec(c + d*x)**3, x) + Integral(tan(c + d*x)**4*sec(c + d*x)**3, x) + Integra
l(4*I*tan(c + d*x)*sec(c + d*x)**3, x) + Integral(-4*I*tan(c + d*x)**3*sec(c + d*x)**3, x) + Integral(sec(c +
d*x)**3, x))

________________________________________________________________________________________